package com.yb.guigu.pick.security.generator;


import com.yb.guigu.pick.core.constant.LoginTypeEnum;
import com.yb.guigu.pick.security.bean.GuiguPickUser;

import java.util.UUID;

public class GuiguPickEmailCodeGenerator implements GuiguPickCodeGenerator {

    @Override
    public String generate(GuiguPickUser guiguPickUser){

        String code = UUID.randomUUID().toString().replaceAll("-", "");

        return code;
    }

    @Override
    public boolean support(String loginType) {
        return LoginTypeEnum.EMAIL_CODE.getLoginType().equals(loginType);
    }
}
